package sis.report;

import static org.junit.Assert.*;
import static sis.report.RosterReporter.NEWLINE;
import static sis.report.RosterReporter.ROSTER_REPORT_FOOTER;
import static sis.report.RosterReporter.ROSTER_REPORT_HEADER;

import org.junit.Test;

import sis.studentinfo.CourseSession;
import sis.studentinfo.DateUtil;
import sis.studentinfo.Student;


public class RosterReporterTest {
	
	@Test
	public void testRosterReport() {
		CourseSession session = CourseSession.Create("ENGL", "101", DateUtil.createDate(2003, 1, 6));
		
		session.enrool(new Student("A"));
		session.enrool(new Student("B"));
		
		String rosterReport = new RosterReporter(session).getReport();
		//System.out.println(rosterReport);
		assertEquals(
				ROSTER_REPORT_HEADER + "A" +
				NEWLINE + "B" +
				NEWLINE + ROSTER_REPORT_FOOTER + "2"
				+ NEWLINE, rosterReport);
	}

}
